package start;

import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.config.Scope;

public class B implements Scope {
    
    public B() {
        System.out.println("Constructor: "+this.getClass().getCanonicalName()+"="+this);
    }
    
    @Override
    public Object get(String name, ObjectFactory objectFactory) {
        Object res = new A();
        System.out.println(this+":get("+name+","+objectFactory+")="+res);
        return res;
    }

    @Override
    public Object remove(String name) {
        System.out.println(this+":remove("+name+")=");
        return null;
    }

    @Override
    public void registerDestructionCallback(String name, Runnable callback) {
        System.out.println(this+":registerDestructionCallback("+name+","+callback+")");
    }

    @Override
    public String getConversationId() {
        System.out.println(this+":getConversationId()=null");
        return null;
    }
}
